import axios from 'axios';

const UPLOAD_ENDPOINT = 'https://store.deepin.org/api/v1/package';

export const uploadPackage = async (token, packageFile) => {
  const formData = new FormData();
  formData.append('package', packageFile);

  return axios.post(UPLOAD_ENDPOINT, formData, {
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'multipart/form-data'
    },
    maxContentLength: 100 * 1024 * 1024  // 允许100MB大文件
  });
};